<?php
namespace app\api\controller\xilumarket;


use app\common\controller\Api;
use app\common\model\xilumarket\ProductCategory AS ProductCategoryModel;

class ProductCategory extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];
    /**
     * 推荐分类列表-一级
     */
    public function recommend_lists(){
        $pagesize = $this->request->param('pagesize',4);
        $this->success('查询成功',ProductCategoryModel::recommendLists($pagesize));
    }

    /**
     * 推荐分类列表-二级
     */
    public function recommend_second_lists(){
        $pagesize = $this->request->param('pagesize',20);
        $this->success('查询成功',ProductCategoryModel::recommendSecondLists($pagesize));
    }

    /**
     * 树状分类列表
     */
    public function lists(){
        $params = $this->request->param('');
        $this->success('查询成功',ProductCategoryModel::lists($params));
    }

}